tg-me.com/codebase_frontend/674
Create:
2025-05-26 Last Update: 2025-06-19 05:13:26
⚙️ Что такое свойство position: sticky
в CSS и зачем оно используется? position: sticky
фиксирует элемент внутри его родителя, когда он достигает определённого положения при прокрутке. Это удобно для заголовков, меню и панелей, которые должны оставаться на виду при скролле.➡️ Пример:
<div class="section"> <h2 class="sticky-title">Заголовок</h2> <p>Контент...</p> </div> <style> .section { height: 1500px; padding: 20px; } .sticky-title { position: sticky; top: 0; background: white; padding: 10px; border-bottom: 1px solid #ccc; } </style> 🗣 В этом примере заголовок "прилипает" к верхней части экрана при прокрутке, но только в пределах родительского блока .section
. CodeBase | Frontend | #CSS BY CodeBase | Frontend
Warning : Undefined variable $i in
/var/www/tg-me/post.php on line
283
Share with your friend now:
tg-me.com/codebase_frontend/674
View MORE
Open in Telegram
CodeBase | Frontend Telegram | DID YOU KNOW?
The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.
CodeBase | Frontend from es